<?php
if (!isset($_REQUEST["tipo"])) {
     $tipo = 2;
}else{
     $tipo = $_REQUEST["tipo"];
}
if (!isset($_REQUEST["id"])) {
     $id   = 0;
}else{
     $id = $_REQUEST["id"];
}

$form1 = new psa_form_dina;
$form1->tabla   = "modulos";
$form1->procesa = "mod/modulos/agrega.php?id=".$id."&psa_modulo=".$_REQUEST["modulo"];
$form1->tipo    = $tipo;
$form1->desde   = 1;
if ($id > 0){
    $form1->llave = " Where id=$id";
}
$form1->gen();
?>